/*
 * @Author: Cenven
 * @Date: 2020-12-07 11:07:37
 * @Description: 北京泓深教育发展有限公司
 */
import Vue from "vue";
import Vuex from "vuex";
import actions from "./actions";
import mutations from "./mutations";
import getters from "./getters";
import config from "../config";

const createStore = () => {
  return new Vuex.Store({
    state: () => ({
      locales: [
        { code: "zh-CN", lang: "简体中文" },
        { code: "en-US", lang: "English-US" },
        { code: "zh-XJ", lang: "维吾尔文" },
        { code: "zh-TW", lang: "繁體中文" }
      ], //国际化
      locale: "zh-CN", //当前语言
      is_client_locale: 0, //用户自定义语言开关
      is_mobile: false,
      is_ios: false,
      is_in_minigram: false,
      is_in_wechat: false,
      is_loading: false,
      is_installed_wechat: false,
      is_installed_alipay: false,
      token: "",
      user_type: "",
      user_info: {},
      web_info: {
        SUB_LOGO: "",
        FAVICON: "",
        BOTTOM_QR_CODE: "",
        COMPANY_LOGO: "",
        DOMAIN: "",
        SYSTEM_NAME: "",
        ICP: "",
        POLICE_RECORD: "",
        SEO_KEY_WORDS: "",
        SEO_ACCESSORY: "",
        COMPANY_NAME: "",
        MOBILE: "",
        TEL: "",
        FAX: "",
        ZIP_CODE: "",
        EMAIL: "",
        QQ: "",
        ABOUT_US: "",
        SEO_DESCRIPTION: "",
        REGISTER_PROTOCOL: "",
        THEME_COLOR: "transparent", //#409eff
        ADVERTISEMENT_SWITCH: 1, //推广广告开关
        DISTRIBUTE_SWITCH: 0, //分销开关
        VERIFY_TYPE: 0, //验证方式：0、邮箱 1、手机号
        RICHTEXT_SWITCH: 0, //试题富文本 0、关闭 1、开启
        AGENT_AREA_SWITCH: 0, //区域代理开关 0、关闭 1、开启
        AGENT_TEAM_SWITCH: 0, //团队分销开关 0、关闭 1、开启
        MEMBER_PROTOCOL: "",
        BOTTOM_NAV_LOGO: "",
        THEME_TYPE: "1",
        THEME_SETTING_OBJ:"",
        BACKEN_HOST:"",
        ANDROID_APP_URL:"",
        IOS_APP_URL:"",
        VIDEO_BULLET:0,
      },
      THEME_COLOR_LIGHTER: "#0000", //主题色更浅的颜色
      THEME_COLOR_DARKER: "#0000", //主题色更深的颜色
      login_type: "", //账号登录类型
      major_list: [], //专业列表
      major_tree: [], //专业树
      class_list: [], //班级列表
      notice_list: [], //通知列表
      banner_list: [], //banner列表
      course_list: [], //课程列表
      buy_record_list: [], //课程购买列表
      buy_combo_list: [], //套餐购买列表
      sign_Agreement_list: [], //课程协议签署列表
      sign_in_course_list: [], //当天签到的课程列表
      nav_list: [], //手机首页导航列表
      course_record_list: [], //课程购买详细列表
      search_history_list: [], //历史搜索记录  只保存在前端
      friend_links_list: [], //友情链接列表
      third_part_login: {
        mp: false,
        open: false,
        qq: false
      }, //第三方登录
      member_discount: {}, //会员优惠折扣
      member_info: {}, //会员信息
      is_hidden_content: false, //隐藏内容区以便过审微信小程序
      is_wechat_ios_limit: true, //微信ios端限制开关
      is_hidden_for_ios: false, //隐藏内容区以便过审App store
      rtc_info: {
        //rtc直播相关
        appId: "",
        appKey: "",
        isUser: "",
        type: 0
      },
      kl_md: {
        KLFX: 0,
        KLHY: 0,
        KLGJH: 0,
        KLSTFWB: 0,
        KLXBK: 0,
        KLST: 0,
        KLGL: 0,
        KLQYDL: 0,
        KLTDFX: 0,
        KLXXDJ: 0,
        KLKCTC: 0,
        KLDX: 0,
        KLSMRZ: 0,
        KLYHJ: 0,
        KLPT: 0,
        KLYJDL: 0,
        KLHWSC: 0,
        KLXBTK: 0,
        KLDLTK: 0,
        KLWXMSG: 0,
        KLJBTK: 0,
        KLCGBG: 0,
        KLZTQH: 0,
        KLKJZF: 0,
        KLQXFL: 0,
        KLKCXY: 0,
        KLZSCL: 0,
        KLJSRZ: 0,
        KLZDYBD: 0,
        KLZYGL: 0,
        KLKCQD: 0,
        KLYXK: 0,
        KLKCKT: 0,
        KLAPP: 0,
        KLKCPJ: 0,
        KLYXRZ: 0,
      },
      authentication: {
        departmentId: null,
        hospitalId: null,
        identityId: null,
        professionalId: null
      }, //认证信息

      /* 新版题库相关 */
      questionBank: {
        /* 题库搜索历史 */
        search_history_list: [],
        /* 题库购买列表 */
        question_record_list: []
      }
    }),
    mutations: mutations,
    actions: actions
  });
};

export default createStore;
